<!DOCTYPE html>
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<title>highlight.glsl</title>
<meta name="generator" content="KF5::SyntaxHighlighting - Definition (GLSL) - Theme (Breeze Dark)"/>
</head><body style="background-color:#232629;color:#cfcfc2"><pre>
<span style="color:#7a7c7d;">// This is a test file for the Katepart GLSL Syntax Highlighting.</span>

normal text
<span style="color:#7a7c7d;">// this is a single-line comment</span>
normal text
<span style="color:#7a7c7d;">/* this</span>
<span style="color:#7a7c7d;">is a multi-line </span>
<span style="color:#7a7c7d;">comment */</span>
normal text

some_symbol.<span style="color:#8e44ad;">some_member</span>;
some_symbol.<span style="color:#8e44ad;">some_member_function</span>();
<span style="color:#8e44ad;">some_function</span>();

<span style="color:#7a7c7d;">// this is a function</span>
<span style="color:#2980b9;">void</span> <span style="color:#8e44ad;">main</span>()
{
	<span style="color:#2980b9;">float</span> f = <span style="color:#f67400;">1.4e3</span>; <span style="color:#7a7c7d;">// decimal float literal</span>
	<span style="color:#2980b9;">int</span> i1 = <span style="color:#f67400;">2884</span>;   <span style="color:#7a7c7d;">// decimal int literal</span>
	<span style="color:#2980b9;">int</span> i2 = <span style="color:#f67400;">0x44</span>;   <span style="color:#7a7c7d;">// hex int literal</span>
	<span style="color:#2980b9;">int</span> i3 = <span style="color:#f67400;">0456</span>;   <span style="color:#7a7c7d;">// octal int literal</span>
}

<span style="color:#7a7c7d;">// this is a structure</span>
<span style="font-weight:bold;">struct</span> some_struct
{
	<span style="color:#2980b9;">vec3</span> some_member_vector;
};

<span style="color:#27ae60;"># this is </span>
<span style="color:#27ae60;">#preprocessor code</span>

<span style="color:#7a7c7d;">// all keywords</span>
<span style="font-weight:bold;">break</span> <span style="font-weight:bold;">continue</span> <span style="font-weight:bold;">do</span> <span style="font-weight:bold;">for</span> <span style="font-weight:bold;">while</span>
<span style="font-weight:bold;">if</span> <span style="font-weight:bold;">else</span>
<span style="font-weight:bold;">true</span> <span style="font-weight:bold;">false</span>
<span style="font-weight:bold;">discard</span> <span style="font-weight:bold;">return</span>
<span style="font-weight:bold;">struct</span>

<span style="color:#7a7c7d;">// all basic types</span>
<span style="color:#2980b9;">float</span> <span style="color:#2980b9;">int</span> <span style="color:#2980b9;">void</span> <span style="color:#2980b9;">bool</span>
<span style="color:#2980b9;">mat2</span> <span style="color:#2980b9;">mat3</span> <span style="color:#2980b9;">mat4</span>
<span style="color:#2980b9;">vec2</span> <span style="color:#2980b9;">vec3</span> <span style="color:#2980b9;">vec4</span>
<span style="color:#2980b9;">ivec2</span> <span style="color:#2980b9;">ivec3</span> <span style="color:#2980b9;">ivec4</span>
<span style="color:#2980b9;">bvec2</span> <span style="color:#2980b9;">bvec3</span> <span style="color:#2980b9;">bvec4</span>
<span style="color:#2980b9;">sampler1D</span> <span style="color:#2980b9;">sampler2D</span> <span style="color:#2980b9;">sampler3D</span>
<span style="color:#2980b9;">samplerCube</span> <span style="color:#2980b9;">sampler1DShadow</span> <span style="color:#2980b9;">sampler1DShadow</span>

<span style="color:#7a7c7d;">// all type qualifiers</span>
<span style="color:#2980b9;">attribute</span> <span style="color:#2980b9;">const</span> <span style="font-weight:bold;">uniform</span> <span style="color:#2980b9;">varying</span>
<span style="color:#2980b9;">in</span> <span style="color:#2980b9;">out</span> <span style="color:#2980b9;">inout</span>

<span style="color:#7a7c7d;">// attensions:</span>
<span style="color:#7a7c7d;">// </span><span style="color:#ca9219;background-color:#451e1a;font-weight:bold;">FIXME</span>
<span style="color:#7a7c7d;">// </span><span style="color:#ca9219;background-color:#451e1a;font-weight:bold;">TODO</span>
<span style="color:#7a7c7d;">// </span><span style="color:#ca9219;background-color:#451e1a;font-weight:bold;">BUG</span>

<span style="color:#7a7c7d;">// some of the std functions</span>
<span style="color:#7f8c8d;font-weight:bold;">radians</span> <span style="color:#7f8c8d;font-weight:bold;">degrees</span> <span style="color:#7f8c8d;font-weight:bold;">sin</span> <span style="color:#7f8c8d;font-weight:bold;">cos</span> <span style="color:#7f8c8d;font-weight:bold;">tan</span> <span style="color:#7f8c8d;font-weight:bold;">asin</span> <span style="color:#7f8c8d;font-weight:bold;">acos</span> <span style="color:#7f8c8d;font-weight:bold;">atan</span>

<span style="color:#7a7c7d;">// some of the std variables</span>
<span style="color:#7f8c8d;font-weight:bold;">gl_Position</span> <span style="color:#7f8c8d;font-weight:bold;">gl_PointSize</span> <span style="color:#27aeae;">gl_ClipVertex</span>

<span style="color:#27ae60;">#version 330 core</span>

<span style="color:#7a7c7d;">// single line comment</span>

<span style="color:#7a7c7d;">/* single line commonet */</span>

<span style="color:#7a7c7d;">/*</span>
<span style="color:#7a7c7d;"> multi line comment</span>
<span style="color:#7a7c7d;"> */</span>

<span style="color:#2980b9;">in</span> ColorFormat {
    <span style="color:#2980b9;">vec3</span> color;
} fs_in;

<span style="color:#2980b9;">out</span> <span style="color:#2980b9;">vec4</span> fragColor;

<span style="color:#2980b9;">vec3</span> <span style="color:#8e44ad;">fun</span>(<span style="color:#2980b9;">const</span> <span style="color:#2980b9;">in</span> <span style="color:#2980b9;">vec3</span> foo) {
    foo[<span style="color:#f67400;">2</span>] = foo.<span style="color:#8e44ad;">x</span>;

    <span style="font-weight:bold;">return</span> foo;
}

<span style="color:#2980b9;">void</span> <span style="color:#8e44ad;">main</span>()
{
    fragColor = <span style="color:#2980b9;">vec4</span>( fs_in.<span style="color:#8e44ad;">color</span>, <span style="color:#f67400;">1.0</span> );
}
</pre></body></html>
